import { NgModule } from '@angular/core';
import { ShareModule } from 'src/app/share/share.module';
import { MusicComponent } from './music.component';
import { RouterModule, Routes } from '@angular/router';
import { MusicResolver } from './music.resolve';

const routes: Routes = [
  {
    path: '',
    component: MusicComponent,
    resolve: { musicDatas: MusicResolver },
    data: { title: '音乐' }
  }
]

@NgModule({
  declarations: [MusicComponent],
  imports: [
    ShareModule,
    RouterModule.forChild(routes)
  ],
  providers: [MusicResolver]
})
export class MusicModule { }
